package com.osce.interfaces.ex;

import com.baomidou.mybatisplus.extension.service.IService;
import com.csce.domain.entity.exam.ExExamRecord;
import com.csce.domain.entity.exam.vo.AllotExRecord;
import com.csce.domain.entity.exam.vo.RecordExcelVo;

import java.util.List;
import java.util.Map;

/**
 * 考试记录Service接口
 *
 * @author zzx
 * @since 2023-08-10
 */
public interface IExExamRecordService extends IService<ExExamRecord> {

    /**
     * 查询考试记录
     *
     * @param id 考试记录主键
     * @return 考试记录
     */
    ExExamRecord selectExExamRecordById(Long id);

    /**
     * 查询考试记录列表
     *
     * @param exExamRecord 考试记录
     * @return 考试记录集合
     */
    List<ExExamRecord> selectExExamRecordList(ExExamRecord exExamRecord);

    /**
     * 新增考试记录
     *
     * @param exExamRecord 考试记录
     * @return 结果
     */
    int insertExExamRecord(ExExamRecord exExamRecord);

    /**
     * 修改考试记录
     *
     * @param exExamRecord 考试记录
     * @return 结果
     */
    int updateExExamRecord(ExExamRecord exExamRecord);

    /**
     * 批量删除考试记录
     *
     * @param ids 需要删除的考试记录主键集合
     * @return 结果
     */
    int deleteExExamRecordByIds(Long[] ids);

    /**
     * 删除考试记录信息
     *
     * @param id 考试记录主键
     * @return 结果
     */
    int deleteExExamRecordById(Long id);

    List<Long> selectAppointExamIds(Long userId);

    int submit(Long id, Integer timer, Map<Long, Object> answers);

    List<Long> selectUserIdsByExam(Long examId);

    int allotUsers(AllotExRecord allot);

    List<RecordExcelVo> selectExExamRecordExcelList(ExExamRecord exExamRecord);

    List<ExExamRecord> checkExExamRecordList(List<ExExamRecord> list);
}
